/**
 * 行单笔代付查询
 */
package com.pay.sdk.service.liquidation;

import java.util.Map;

import com.pay.sdk.common.Configure;
import com.pay.sdk.service.IPostService;
import com.pay.sdk.util.MD5Utils;

public class MsPayQuery extends IPostService {

    private static final String SERVICE_NAME = "LIQUIDATION_QUERY";
    private static final String SERVICE_CHARSET = "UTF-8";
    private static final String SERVICE_SIGN_TYPE = "MD5";
    
    
    @Override
    public String exec(Map<String, String> params){
    	//通用参数
//        params.put("version", SERVICE_VERSION);
//        params.put("charset", SERVICE_CHARSET);
//        params.put("sign_type",SERVICE_SIGN_TYPE);
        //请求参数
        params.put("service", SERVICE_NAME);
        params.put("merchant_no", Configure.getMerchantNo());
        params.put("query_sn", params.get("query_sn"));
        params.put("user_order_no", params.get("user_order_no"));
		params = MD5Utils.signMap(params, SERVICE_SIGN_TYPE, Configure.getKey(), SERVICE_CHARSET);
        return txn(Configure.isDevEnv() ? Configure.LIQUIDATION_GATEWAY_DEV_PAI : Configure.LIQUIDATION_GATEWAY_PAI, params);
    }
}
